package com.kaigejava.juc.pool.threadpool;

import java.util.Collections;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author kaigejava
 * 线程池的三种实现方式
 */
public class ThreadImplementation {
    public static void main(String[] args) {
        //1：只有一个线程数量的
        ExecutorService oneSizeThreadPool = Executors.newSingleThreadExecutor();
        oneSizeThreadPool.execute(()->{

        });
        //2：带有规定线程数量的

        //3：可变线程数量的

        Map mp =  Collections.synchronizedMap(new HashMap<>());
        Hashtable tb = new Hashtable();
    }
}
